package com.kh.samr.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.util.Date;

/**
 * 根据起始时间查询列表Dto
 *
 * @author Harry
 * @date 2020/12/29
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "根据统一社会信用代码查询Dto")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FindListByStartingTimeDto extends ParamPageDto {
	
	private static final long serialVersionUID = 6012317845464650206L;
	
	@ApiModelProperty(value = "起始时间", required = true, example = "2019-12-29 00:00:00")
	@NotNull(message = "请填入正确起始时间")
	@Past(message = "请填入正确起始时间")
	@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "zh", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
	private Date startTime;
}
